import rest from '@/api/request'

export function getAttendanceList(page: string, pagesize: string, deptID: any) {
    return rest.get(`/attendances?page=${page}&pagesize=${pagesize}&deptID=${deptID}`)
}
//获取公司经纬度坐标列表
export function getCompanyCoordinateList() {
    return rest.get(`/company/list`)
}
//更新公司经纬度列表
export function updateCompanyCoordinateList(data: any) {
    return rest.put(`/company/list`, { list: data })
}
//根据部门id查询考勤设置
export function getAttendanceSetting(deptID: any) {
    return rest.get(`/cfg/atte/item?departmentId=${deptID}`)
}
//保存考勤设置
export function saveAttendanceSetting(data: any) {
    return rest.put(`/cfg/atte`, data)
}


//获取请假设置

export function getLeaveSetting(departmentId:string) {
    return rest.get("/cfg/leave/list"+"?departmentId="+departmentId)
}

//保存请假设置
export function saveLeaveSetting() {
    return rest.post("/cfg/leave")
}

//获取扣款
export function getDeductionSetting(departmentId:string) {
    return rest.get('/cfg/ded/list'+"?departmentId="+departmentId)
}